All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.swing.DefaultListModel

java.lang.Object
   |
   +----com.sun.java.swing.AbstractListModel
           |
           +----com.sun.java.swing.DefaultListModel

public class DefaultListModel
extends AbstractListModel
This class implements the java.util.Vector API and notifies the JListDataModel listeners when changes occur. Presently it delegates to a Vector, in a future release it will be a real Collection implementation.

Warning: serialized objects of this class will not be compatible with future swing releases. The current serialization support is appropriate for short term storage or RMI between Swing1.0 applications. It will not be possible to load serialized Swing1.0 objects with future releases of Swing. The JDK1.2 release of Swing will be the compatibility baseline for the serialized form of Swing objects.


Constructor Index

 o DefaultListModel()

Method Index

 o add(int, Object)
 o addElement(Object)
 o capacity()
 o clear()
 o contains(Object)
 o copyInto(Object[])
 o elementAt(int)
 o elements()
 o ensureCapacity(int)
 o firstElement()
 o get(int)
 o getElementAt(int)
Returns the value at the specified index.
 o getSize()
Returns the length of the list.
 o indexOf(Object)
 o indexOf(Object, int)
 o insertElementAt(Object, int)
 o isEmpty()
 o lastElement()
 o lastIndexOf(Object)
 o lastIndexOf(Object, int)
 o remove(int)
 o removeAllElements()
 o removeElement(Object)
 o removeElementAt(int)
 o removeRange(int, int)
 o set(int, Object)
 o setElementAt(Object, int)
 o setSize(int)
 o size()
 o toArray()
 o toString()
 o trimToSize()

Constructors

 o DefaultListModel
 public DefaultListModel()

Methods

 o getSize
 public int getSize()
Returns the length of the list.

Overrides:
getSize in class AbstractListModel
 o getElementAt
 public Object getElementAt(int index)
Returns the value at the specified index.

Overrides:
getElementAt in class AbstractListModel
 o copyInto
 public void copyInto(Object anArray[])
 o trimToSize
 public void trimToSize()
 o ensureCapacity
 public void ensureCapacity(int minCapacity)
 o setSize
 public void setSize(int newSize)
 o capacity
 public int capacity()
 o size
 public int size()
 o isEmpty
 public boolean isEmpty()
 o elements
 public Enumeration elements()
 o contains
 public boolean contains(Object elem)
 o indexOf
 public int indexOf(Object elem)
 o indexOf
 public int indexOf(Object elem,
                    int index)
 o lastIndexOf
 public int lastIndexOf(Object elem)
 o lastIndexOf
 public int lastIndexOf(Object elem,
                        int index)
 o elementAt
 public Object elementAt(int index)
 o firstElement
 public Object firstElement()
 o lastElement
 public Object lastElement()
 o setElementAt
 public void setElementAt(Object obj,
                          int index)
 o removeElementAt
 public void removeElementAt(int index)
 o insertElementAt
 public void insertElementAt(Object obj,
                             int index)
 o addElement
 public void addElement(Object obj)
 o removeElement
 public boolean removeElement(Object obj)
 o removeAllElements
 public void removeAllElements()
 o toString
 public String toString()
Overrides:
toString in class Object
 o toArray
 public Object[] toArray()
 o get
 public Object get(int index)
 o set
 public Object set(int index,
                   Object element)
 o add
 public void add(int index,
                 Object element)
 o remove
 public Object remove(int index)
 o clear
 public void clear()
 o removeRange
 public void removeRange(int fromIndex,
                         int toIndex)

All Packages  Class Hierarchy  This Package  Previous  Next  Index